import java.util.Scanner;

public class Ex5_2{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		System.out.print("Enter an integer: ");
		int num = input.nextInt();
		int sum = sumDigits(num);
		System.out.printf("The sumation of %d's digits is: %d\n", num, sum);
	}

	public static int sumDigits(long n){
		int sum = 0;
		while (n != 0){
			long d = n % 10;
			sum += d;
			n /= 10;
		}
		return sum;
	}
}
